package com.jumi.microservice.util;

import org.apache.commons.lang3.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author ssk
 * @create 20/11/13 11:37
 **/
public class RegexUtils {

    public static boolean isMobile(String src) {
        String regex = "^1[3-9]\\d{9}$";
        Pattern mobile_pattern = Pattern.compile(regex);
        if (StringUtils.isEmpty(src)) {
            return false;
        }
        Matcher m = mobile_pattern.matcher(src);
        return m.matches();
    }
}
